//
//  ModifyPasswordViewController.m
//  OAProject
//
//  Created by yhj on 2017/2/22.
//  Copyright © 2017年 cdnunion. All rights reserved.
//  修改密码主界面

#import "ModifyPasswordViewController.h"
#import "LabelTextFieldView.h"

@interface ModifyPasswordViewController ()

@end

@implementation ModifyPasswordViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.title=@"修改密码";

    [self initData];
}

-(void)initData
{
    // 原密码
    LabelTextFieldView *oldPasswordView=[[LabelTextFieldView alloc]initWithTitle:@"原密码" placeholder:@"请输入原密码"];
    [self.view addSubview:oldPasswordView];
    [oldPasswordView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(kmargin);
        make.top.mas_equalTo(64);
        make.right.mas_equalTo(-kmargin);
        make.height.mas_equalTo(kmargin*4);
    }];

    // 新密码
    LabelTextFieldView *newPasswordView=[[LabelTextFieldView alloc]initWithTitle:@"新密码" placeholder:@"请输入新密码"];
    [self.view addSubview:newPasswordView];
    [newPasswordView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(kmargin);
        make.right.mas_equalTo(-kmargin);
        make.height.mas_equalTo(kmargin*4);
        make.top.mas_equalTo(oldPasswordView.mas_bottom);
    }];


    // 再次输入
    LabelTextFieldView *secondPasswordView=[[LabelTextFieldView alloc]initWithTitle:@"再次输入" placeholder:@"请再次输入新密码"];
    [self.view addSubview:secondPasswordView];
    [secondPasswordView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(kmargin);
        make.right.mas_equalTo(-kmargin);
        make.height.mas_equalTo(kmargin*4);
        make.top.mas_equalTo(newPasswordView.mas_bottom);
    }];


    // 提交
    UIButton *submitBtn=[UIButton new];
    [self.view addSubview:submitBtn];
    submitBtn.backgroundColor=HexRGB(0x4876FF);
    submitBtn.titleLabel.font=Font_Number(16);
    ViewBorderRadius(submitBtn,kmargin/2,1,ClearColor);
    [submitBtn setTitle:@"提交" forState:0];
    [submitBtn setTitleColor:WhiteColor forState:0];
    [submitBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(secondPasswordView.mas_bottom).offset(kmargin*3);
        make.size.mas_equalTo(CGSizeMake(APPW-kmargin*8,35));
        make.left.mas_equalTo(kmargin*4);
    }];
    [submitBtn addTarget:self action:@selector(submitBtnEvent) forControlEvents:UIControlEventTouchUpInside];

}


-(void)submitBtnEvent
{

}

@end
